@import './variables.module.scss';
@import './mixin.scss';
@import './transition.scss';
@import './element-ui.scss';
@import './sidebar.scss';
@import './btn.scss';
@import './variables-new.scss';

body {
  height: 100%;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
}

label {
  font-weight: 700;
}

html {
  height: 100%;
  box-sizing: border-box;
}

#app {
  height: 100%;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

.no-padding {
  padding: 0px !important;
}

.padding-content {
  padding: 4px 0;
}

a:focus,
a:active {
  outline: none;
}

a,
a:focus,
a:hover {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

div:focus {
  outline: none;
}

.fr {
  float: right;
}

.fl {
  float: left;
}

.pr-5 {
  padding-right: 5px;
}

.pl-5 {
  padding-left: 5px;
}

.block {
  display: block;
}

.pointer {
  cursor: pointer;
}

.inlineBlock {
  display: block;
}

.clearfix {
  &:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: ' ';
    clear: both;
    height: 0;
  }
}

aside {
  background: #eef1f6;
  padding: 8px 24px;
  margin-bottom: 20px;
  border-radius: 2px;
  display: block;
  line-height: 32px;
  font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans',
    'Helvetica Neue', sans-serif;
  color: #2c3e50;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  a {
    color: #337ab7;
    cursor: pointer;

    &:hover {
      color: rgb(32, 160, 255);
    }
  }
}

//main-container全局样式
@mixin card {
  padding: 15px 10px 0px 10px;
  box-sizing: border-box;
  overflow-x: hidden;
  background-color: #fff;
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  box-shadow: 0 0 12px rgb(0 0 0 / 5%);
}
.app-container {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  height: calc(100% - 20px);
  padding: 5px;
  // background-color: #f0f2f5;
  background-color: transparent;

  .table-search {
    @include card;
    margin-bottom: 10px;
    // search 竖线
    &:before {
      content: '';
      float: left;
      width: 4px;
      height: 100%;
      background: #0633ff;
      margin-right: 10px;
    }
    .el-form {
      .el-input,
      .el-select,
      .el-date-editor--timerange,
      .el-date-editor--datetimerange,
      .el-date-editor--daterange {
        width: 100%;
      }

      // 去除时间选择器上下 padding
      .el-range-editor.el-input__wrapper {
        padding: 0 10px;
      }

      // el-select 为多选时不换行显示
      .el-select__tags {
        overflow: hidden;
        white-space: nowrap;
      }
    }
    .operation {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      margin-bottom: 18px;
    }
  }

  .table-container {
    display: flex;
    flex: 1;
    flex-direction: column;
    width: 100%;
    height: 100%;
    @include card;
    padding-bottom: 5px;
    // btn style
    .btn-container {
      display: flex;
      justify-content: space-between;
      margin-bottom: 10px;
    }
    // form style: table in form
    .el-form {
      display: flex;
      flex: 1;
      flex-direction: column;
      width: 100%;
      height: 100%;
      overflow: hidden; // need bfc
    }
    // table style
    .el-table {
      flex: 1;
      table {
        width: 100%;
      }
      .el-table__header th {
        font-size: 15px;
        font-weight: bold;
        color: #252525;
        background: #fafafa;
      }
      .el-table__row {
        font-size: 14px;
      }

      // 设置 el-table 中 header 文字不换行，并省略
      .el-table__header .el-table__cell > .cell {
        white-space: nowrap;
      }

      // 解决表格数据为空时样式不居中问题(仅在element-plus中)
      .el-table__empty-block {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        .table-empty {
          line-height: 30px;
        }
      }

      // table 中 image 图片样式
      .table-image {
        width: 50px;
        height: 50px;
        border-radius: 50%;
      }

      .el-table__inner-wrapper {
        position: relative;
        display: flex;
        flex-direction: column;
        height: 100%;
      }

      .el-table__body-wrapper {
        overflow: auto;
        position: relative;
        flex: 1;
      }
    }
    // pagination style
    .el-pagination {
      display: flex;
      justify-content: flex-end;
      margin-top: 10px;
    }
  }
}

.table-wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
}

.components-container {
  margin: 30px 50px;
  position: relative;
}

.search-form {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.text-center {
  text-align: center;
}

.sub-navbar {
  height: 50px;
  line-height: 50px;
  position: relative;
  width: 100%;
  text-align: right;
  padding-right: 20px;
  transition: 600ms ease position;
  background: linear-gradient(
    90deg,
    rgba(32, 182, 249, 1) 0%,
    rgba(32, 182, 249, 1) 0%,
    rgba(33, 120, 241, 1) 100%,
    rgba(33, 120, 241, 1) 100%
  );

  .subtitle {
    font-size: 20px;
    color: #fff;
  }

  &.draft {
    background: #d0d0d0;
  }

  &.deleted {
    background: #d0d0d0;
  }
}

.link-type,
.link-type:focus {
  color: #337ab7;
  cursor: pointer;

  &:hover {
    color: rgb(32, 160, 255);
  }
}

.filter-container {
  padding-bottom: 10px;

  .filter-item {
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 10px;
  }
}

//refine vue-multiselect plugin
.multiselect {
  line-height: 16px;
}

.multiselect--active {
  z-index: 1000 !important;
}
